set -eux

echo "$0"

proj_root=$(dirname $(dirname $(realpath $0)))
cd $proj_root

echo "proj_root: ${proj_root}"

# https://pdm.fming.dev/2.4/usage/pep582/
# enable pep582
mkdir -p __pypackages__

pip config set global.trusted-host mirrors.cloud.tencent.com
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
pip install --upgrade pip

cache_dir="/root/.cache/.pip.cache"
echo "cache_dir: ${cache_dir}"

# PIP_CACHE_DIR=${cache_dir} pip install -v pdm
